package com.lh.ssm.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;

@Data
@ToString
public class Cart {

    private Integer id;

    private Integer uid;

    private Integer pid;

    private Product product;

    /**
     * 购物车中所有商品的总金额
     */
    private BigDecimal total;

    /**
     * 购物车中的商品数量
     */
    private Long count;

    public Cart(Integer id, Integer uid, Integer pid, Product product, BigDecimal total, Long count) {
        this.id = id;
        this.uid = uid;
        this.pid = pid;
        this.product = product;
        this.total = total;
        this.count = count;
    }
}
